package com.demo.cloudsb.controller;

import com.demo.cloudsb.feign.CloudSaFeign;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/consumer")
public class ComsumerController {

    @Resource
    private CloudSaFeign cloudSaFeign;

    @PostMapping("/hello")
    public String hello(){
        log.info("cloud-sb开始调用sa服务");
        String result = cloudSaFeign.test();
        log.info("cloud-sb调用sa服务结束");
        return result;
    }
}
